#ifndef PROFESSIONDIALOG_H
#define PROFESSIONDIALOG_H

#include <QDialog>
#include <QVariantMap>

namespace Ui {
    class ProfessionDialog;
}

class AbilityListModel;
class QAbstractButton;

class ProfessionDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ProfessionDialog(QWidget *parent = 0);
    ~ProfessionDialog();

    void setGdrData(QVariantMap*);
    void prepareForNew();

private slots:
    void on_buttons_clicked(QAbstractButton* button);
    void setProfession(QString);

    void on_pbAddAbil_clicked();

    void on_pbRemoveAbil_clicked();

private:
    Ui::ProfessionDialog *ui;

    bool newMode;
    QVariantMap* gdrData;
    AbilityListModel *profalm, *alm;

    void setupAbilities(QString categ, QString subcateg, QVariantList list);
    void setupAbilities();
    void saveProfession();
};

#endif // PROFESSIONDIALOG_H
